<template>
  <div>
    <img :src="url" class="size" @click="onImgClick">
    <p>{{num}}</p>
  </div>
</template>

<script>
export default {
  name: 'swiper',
  props: {
    url: {
      type: String,
      default: ''
    },
    num: {
      type: Number
    },
    obj: {
      type: Object
    }
  },
  data () {
    return {
      numText: this.num
    }
  },
  created () {
  },
  watch: {
  },
  methods: {
    onImgClick () {
      // alert(111)
      this.$emit('sub-event', this.num)
      // this.obj = {
      //   name: '666'
      // }
      // this.obj.name = '666'
      // console.log(this.url)
      // console.log(this.num)
      // console.log(this.obj)
    }
  }
}
</script>

<style scoped>
.size {
  width: 100%;
}
</style>
